<?php

use think\migration\Migrator;
use think\migration\db\Column;

class BasicEmissionStandards extends Migrator
{
    public function change()
    {
        $table = $this->table('basic_emission_standards');
        $table
            ->addColumn('region_id', 'integer', ['limit' => 11, 'default' => '53', 'comment' => '区域ID'])
            ->addColumn('industry_id', 'integer', ['limit' => 2,  'comment' => '行业ID'])
            ->addColumn('industry_name', 'string', ['limit' => 50, 'default' => '', 'comment' => '行业名称'])
            ->addColumn('production_process', 'string', ['limit' => 50, 'default' => '', 'comment' => '生产工艺'])
            ->addColumn('emission_standards', 'string', ['limit' => 200, 'default' => '0', 'comment' => '排放限值标准单位mg/m3'])
            ->addColumn('delete_time', 'integer', ['limit' => 11, 'default' => 0, 'comment'=>'软删除'])

            //注释
            ->setComment('基本信息 - 行业标准排放值')

            //引擎
            ->setEngine('InnoDB')
            ->save();
    }
}
